package NGUYENHOANG.OOP.SAMPLE2;


public class MODELS {
		/***
		 * Xử lý tính toán
		 * @param a
		 * @param b
		 * @param opt 0 - Cộng; 1 - Trừ; 2 - Nhân; 3 - Chia;
		 * @return
		 */
		
		public double Calcutors	(double a, double b, short opt) {
			double result = 0;
			switch (opt) {
			case 0:
				result = a+b;
				break;
			case 1:
				result = a-b;
				break;
			case 2:
				result = a*b;
				break;
			case 3:
				result = a/b;
				break;
			}
			return result;
		}

	}


